@import "./commonFun.less";

:root {
  .w100 {
    width: 100%;
  }

  .h100 {
    height: 100%;
  }

  .mR8 {
    margin-right: 8px;
  }

  .mL8 {
    margin-left: 8px;
  }

  .mT8 {
    margin-top: 8px;
  }

  .mT4 {
    margin-top: 4px;
  }

  .mB4 {
    margin-bottom: 4px;
  }

  .pT10 {
    padding-top: 10px;
  }

  .fontSize12 {
    font-size: 12px;
  }

  .boldText {
    font-weight: bold;
  }

  // 鼠标悬浮变小手
  .pointer {
    cursor: pointer;
  }

  // 文本超出不换行显示省略号
  .text_over_flow {
    .text_over_flow();
  }

  // 文本居中
  .text_center {
    text-align: center;
  }

  // y轴超出滚动
  .scrollY {
    overflow-y: auto;
  }

  .scrollX {
    overflow-x: auto;
  }

  // 禁用时文字灰色
  .disable_text {
    color: var(--tableDisabledColor);
    cursor: not-allowed;
  }

  .form_lable {
    color: var(--formLabelColor);
  }

  .common-border {
    .common-border();
  }

  .common-tips {
    font-size: 12px;
    color: #8c8c8c;
  }

  .primary {
    color: var(--colorPrimary)
  }

  .size100 {
    .size100();
  }

  // #region css 防抖
  button:not(.no_throttle) {
    animation: throttle 0.5s step-end forwards;

    &:active {
      animation: none;
    }

    @keyframes throttle {
      from {
        pointer-events: none;
      }

      to {
        pointer-events: all;
      }
    }
  }

  // #endregion
}

/* 设置滚动条的样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  // padding-right: 4px;
}

/* 滚动槽 */
::-webkit-scrollbar-track {
  // box-shadow: inset 0 0 2px 0 rgba(105, 105, 105, 0.3);
  // border-radius: 3px;
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  border-radius: 99px;
  // border-right: 2px solid #fff;
  background: #dfdcdc;

  &:hover {
    background: #d2e9ff;
  }

  // box-shadow: inset 0 0 2px 0 rgba(105, 105, 105, 0.5);
}